<template>
  <view class="mine" id="mine">
      <view class="header">
        <view class="avater">
          <AtAvatar :image='imgAvaterUrl'></AtAvatar>
          <!-- <image
              class="imgAvater"
              :src="imgAvaterUrl"
            /> -->
        </view>
        <view class="nick">
          <view class="nickName">{{userInfo.h_real_name}}·{{ userInfo.role_name }}</view>
          <view class="username">{{userInfo.h_user_name}}</view>
        </view>
       <view class="floatIcon"></view>
      </view>
     <view class="orderList">
      <view class="listItem currentOrder"><view class="title">当日订单量</view><view class="numbers">100</view></view>
      <view class="listItem yestodyOrder"><view  class="title">昨日订单量</view><view class="numbers">100</view></view>
      <view class="listItem monthOrder"><view  class="title">当月订单量</view><view class="numbers">100</view></view>
      <view class="listItem lastMonthOrder"><view  class="title">上月订单量/收益</view><view class="numbers">100</view></view>
     </view>
      <view class="list">
       
        <view class="listContaine">
          <AtList :hasBorder="false">
          <AtListItem
              title='收益计算规则'
              arrow='right'
              :hasBorder="true"
              @tap="gotoPage('/pages/getMoneyRule/getMoneyRule')"
              :iconInfo="{ size: 25, color: '#333', value: 'money', }"
            />
            <AtListItem
              title='设备管理'
              arrow='right'
              :hasBorder="true"
              @tap="gotoPage('/pages/deviceManagement/deviceManagement')"
              :iconInfo="{ size: 25, color: '#333', value: 'filter', }"
            />
            <AtListItem
              title='设备订单'
              arrow='right'
              @tap="gotoPage('/pages/deviceOrder/deviceOrder')"
              :hasBorder="true"
              :iconInfo="{ size: 25, color: '#333', value: 'calendar', }"
            />
            <AtListItem
              title='申报报单'
              arrow='right'
              @tap="gotoPage('/pages/setOrder/setOrder')"
              :hasBorder="true"
              :iconInfo="{ size: 25, color: '#333', value: 'numbered-list', }"
            />
            <AtListItem
              title='设置'
              arrow='right'
              @tap="gotoPage('/pages/setting/setting')"
              :hasBorder="false"
              :iconInfo="{ size: 25, color: '#333', value: 'settings', }"
            />
        </AtList>
        </view>
      </view>
  </view>
</template>

<script setup>
import { ref,  } from 'vue'
import Taro from '@tarojs/taro'
import './mine.less'
import { AtList, AtListItem } from 'taro-ui-vue3'

const userInfo = ref({})
let userInfoStr = Taro.getStorageSync('userInfo')

userInfo.value = userInfoStr ? JSON.parse(userInfoStr) : {}



Taro.setNavigationBarColor({
    frontColor: '#000000',
    backgroundColor: '#C0EDED'
})
const imgAvaterUrl = ref('')
imgAvaterUrl.value = require('../../images/logo.png')


function gotoPage (url) {
  Taro.navigateTo({
    url: url
  })
}
</script>
